import "element-plus/es/components/message/style/css";
import { ElMessage } from "element-plus";
import type { EpPropMergeType } from "element-plus/es/utils/vue/props/types";

export function toast(
  message = "",
  type: EpPropMergeType<
    StringConstructor,
    "success" | "warning" | "info" | "error",
    unknown
  > = "error",
  duration = 1500
) {
  return ElMessage({ message, type, duration });
}
